package com.toe.order.service;

import com.toe.pojo.dto.order.AddOrderClassDTO;
import com.toe.pojo.entity.order.OrderClass;
import com.baomidou.mybatisplus.extension.service.IService;
import com.toe.pojo.vo.order.OrderClassSimpleVO;
import com.toe.pojo.vo.order.OrderClassDetailsVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 陶涛
 * @since 2022-07-19
 */
public interface OrderClassService extends IService<OrderClass> {

    Long addNewOrder(AddOrderClassDTO addOrderClassDTO);

    void deleteByOrderId(Long orderId);

    OrderClassDetailsVO getOrderDetails(Long orderId);

    List<OrderClassSimpleVO> listAllOrderByUserId(Long userId, int pageNum, int pageSize);

    List<OrderClassSimpleVO> listCancelOrderByUserId(Long userId, int pageNum, int pageSize);

    List<OrderClassSimpleVO> listPayOrderByUserId(Long userId, int pageNum, int pageSize);

    List<OrderClassSimpleVO> listNotPayOrderByUserId(Long userId, int pageNum, int pageSize);

    void pay(Long orderId, String returnUrl, HttpServletResponse httpResponse);

    void phonePay(Long orderId, HttpServletResponse httpResponse);

    void appPay(Long orderId, HttpServletResponse httpResponse);

    void returnUrl(Long orderId, HttpServletRequest request);

//    void refund(Long orderId);

}


